package com.example.falvback.mapper;

import com.example.falvback.entity.Anli;
import com.example.falvback.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;
@Mapper
public interface AnliMapper {
    @Select("select * from anli")
    List<Anli> showAnli();
    @Update("update anli set title=#{title}, content=#{content}, img=#{img} where id=#{id}")
    void updateAnli(Anli anli);
    @Select("select * from anli where column=#{column}")
    List<Anli> getAnliByColumn(String column);
    @Insert("insert into anli(title,content,img) values (#{title},#{content},#{img})")
    void insert(Anli anli);

    @Select("select * from anli where id = #{id}")
    List<Anli> findById(@Param("id") Long id);

    @Delete("DELETE FROM anli WHERE id = #{id}")
    void deleteAnli(Integer id);
}
